﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS.Entity.MES
{
    public class MESWriteData
    {
        /// <summary>
        /// 设备ID
        /// </summary>
        public int MachineId { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        public int MachineType { get; set; }

        /// <summary>
        /// 操作类型： 1：上料 2：下料  3：检验 4：包装
        /// </summary>
        public int ActionTypeId { get; set; }

        /// <summary>
        /// 标准工序ID
        /// </summary>
        public int StandardRouteId { get; set; }

        /// <summary>
        /// 总成ID，物料信息id
        /// </summary>
        public int ProductId { get; set;}

        /// <summary>
        /// 除特殊要求外，唯一标识
        /// </summary>
        public string Key { get; set; }

        public Data data { get; set; }

    }

    public class Data 
    {
        /// <summary>
        /// //产品码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// //多个产品码;分割
        /// </summary>
        public string ProductCodes { get; set; }

        /// <summary>
        /// 客户码
        /// </summary>
        public string CustomerCode { get; set; }

        /// <summary>
        /// 批次码
        /// </summary>
        public string BatchNumber { get; set; }

        /// <summary>
        /// 箱码
        /// </summary>
        public string BoxCode { get; set; }

        /// <summary>
        /// 零件码
        /// </summary>
        public string PartCode { get; set; }

        /// <summary>
        /// 料架码
        /// </summary>
        public string RackCode { get; set; }

        /// <summary>
        /// 托盘码
        /// </summary>
        public string TrayCode { get; set;}

        public string WeldBadness { get; set;}

        /// <summary>
        /// 结果1：OK2：NG
        /// </summary>
        public int Result { get;set; }

        public List<Params> Params { get; set; }

    }

    public class Params 
    {
        /// <summary>
        /// //参数类型
        /// </summary>
        public string ParamType { get; set; }

        /// <summary>
        /// 参数值
        /// </summary>
        public string ParamValue { get; set; }

        /// <summary>
        /// 位置 如无写入空字符串
        /// </summary>
        public string Position { get; set;}

        /// <summary>
        /// 参数结果1：OK2：NG
        /// </summary>
        public int Result { get; set; }
    }
}
